﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Framework.UnitOfWork;
using Microsoft.Practices.Unity;
using Framework.Repositories;

namespace Framework.Command
{
    public abstract class CommandHandler : ICommandHandler
    {
        protected IUnitOfWork UnitOfWork
        {
            get;
            set;
        }

        protected IDomainRepository DomainRepository
        {
            get;
            set;
        }

        [InjectionMethod]
        public void Initialize(IUnitOfWork uow)
        {
            UnitOfWork = uow;
            DomainRepository = UnitOfWork.DomainRepository;
        }
    }
}
